package com.haiwen.boot.controller;

import org.apache.shiro.ShiroException;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import javax.servlet.http.HttpServletRequest;

@RestControllerAdvice
public class ExceptionController {




    // 捕捉shiro的异常
    @ExceptionHandler(ShiroException.class)
    public String handle401() {
        return "请重新登录！";
    }
}
